import { createApp } from "vue";
import App from "./App.vue";

// import "~/styles/element/index.scss";

// import ElementPlus from "element-plus";
// import all element css, uncommented next line
// import "element-plus/dist/index.css";

// or use cdn, uncomment cdn link in `index.html`

import "~/styles/index.scss";
import "uno.css";

// If you want to use ElMessage, import it.
import "element-plus/theme-chalk/src/message.scss";
// 解决ElMessageBox样式丢失问题
import "element-plus/theme-chalk/src/message-box.scss";
import { setupRouter } from "./router";
import * as ElementPlusIcons from '@element-plus/icons-vue';//导入所有icons
import { createPinia } from 'pinia';

const store = createPinia();
const setupApp = async() => {
    const app = createApp(App);
    app.use(store);
    // 创建路由
    setupRouter(app);
    for (const [key, component] of Object.entries(ElementPlusIcons)) {
        app.component(key, component)
    }
    app.mount('#app');
}

setupApp();



// const app = createApp(App);
// // app.use(ElementPlus);
// app.mount("#app");
